<?php
declare (strict_types = 1);
namespace security;

/**
 * 
 */
interface UserDetails {

    /**
     * Returns the authorities granted to the user.
     * 返回该用户的所有权限
     */
    public function getAuthorities(): array;

    /**
     * Returns the password used to authenticate the user.
     */
    public function getPassword(): string;

    /**
     * Returns the username used to authenticate the user.
     */
    public function getUsername(): string;

    /**
     * Indicates whether the user's account has expired.
     */
    public function isAccountNonExpired(): bool;
    
    /**
     * Indicates whether the user is locked or unlocked.
     */
    public function isAccountNonLocked(): bool;
    
    /**
     * Indicates whether the user's credentials (password) has expired.
     */
    public function isCredentialsNonExpired(): bool;
    
    /**
     * Indicates whether the user is enabled or disabled.
     */
    public function isEnabled(): bool;
}